package cn.springmvc.service.impl;


import cn.springmvc.model.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.springmvc.dao.UserDAO;
import cn.springmvc.model.User;
import cn.springmvc.service.UserService;

import java.util.List;


@Service
public class UserServiceImpl implements UserService{

    @Autowired
    private UserDAO userDAO;

    @Override
    public int insertUser(User user) {

        return userDAO.insertUser(user);
    }

    @Override
    public List<User> getUsers(Page page) {

        return userDAO.getUsers(page);
    }

    @Override
    public List<User> getAllUser() {
        return userDAO.getAllUser();
    }

    @Override
    public long getAllUserCount() {
        return userDAO.getAllUserCount();
    }

}